<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>云端留言板</title>
</head>
<body>
    <h1>提交留言功能区</h1>
    <form action="/msggate/" method="post">
        {% csrf_token %}
        发送方<input type="text" name="userA"/><br/>
        接收方<input type="text" name="userB"/><br/>
        消息文<input type="text" name="msg"/><br/>
        <input type="submit" value="submit"/>
    </form>

    <h1>获取留言功能区</h1>
    <form action="/msggate/" method="get">
        接收方<input type="text" name="userC"/><br/>
        <input type="submit" value="submit"/>
    </form>

    <table border="1">
        <thead>
            <th>留言时间</th>
            <th>留言来源</th>
            <th>留言信息</th>
        </thead>
        <br/>
        <tbody>
            {% for line in data %}
            <tr>
                <td>{{ line.time }}</td>
                <td>{{ line.userA }}</td>
                <td>{{ line.msg }}</td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
</body>
</html>